#ifndef _LINUX_LINKAGE_H
#define _LINUX_LINKAGE_H

#define __ALIGN		.align 4,0x90
#define ALIGN __ALIGN
#define SYM_A_ALIGN				ALIGN

#define SYM_L_GLOBAL(name)			.globl name

#define ASM_NL		 ;

#define SYM_ENTRY(name, linkage, align...)		\
	linkage(name) ASM_NL				\
	align ASM_NL					\
	name:

#define SYM_START(name, linkage, align...)		\
	SYM_ENTRY(name, linkage, align)

#define SYM_FUNC_START(name)				\
	SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)

#define ENTRY(name) \
	SYM_FUNC_START(name)


#define SYM_T_FUNC function

#define SYM_END(name, sym_type)				\
	.type name sym_type ASM_NL			\
	.size name, .-name

#define SYM_FUNC_END(name)				\
	SYM_END(name, SYM_T_FUNC)

#define ENDPROC(name) \
	SYM_FUNC_END(name)

#endif
